$(".a2").click(function () {
    location.href = "register.html"
})
// 登录接口
$('#btn').click(function () {
    $.post('../php/login.php', { 'username': $('#username').val(), 'userpass': $('#userpwd').val() }, function (data) {
        if (data.trim() == 'success') {
            confirm('登陆成功！');
            setCookie("name", $('#username').val());
            setCookie("pwd", $('#userpwd').val() / 1);
            location.href = 'index.html'
        } else {
            confirm('用户名或密码错误，请重试！')
        }
    })
})